{include 'common/header.html'}
<body>
<!-- header start -->
<header>
<p style="text-align: right;">
<span style="font-size: 2em;margin-left: 1em;display: inline-block;color: #ee7700;float: left;"><a href="{$config['url']}" style="text-decoration: none;">{$config['name']}</a></span>
{if($login_user)}
<span style="display: inline-block;margin-right: 1em;"><a href="{$this->urlCreate('user','home')}">{$login_user['user']}</a><b style="margin: 0 0.5em;">.</b><a href="{$this->urlCreate('user','logout')}">注销</a></span>
{else}
<span style="display: inline-block;margin-right: 1em;"><a href="{$this->urlCreate('user','login')}">登录</a><b style="margin: 0 0.5em;">.</b><a href="{$this->urlCreate('user','register')}">注册</a></span>
{/if}
</p>
</header>
<!-- header end -->

<!-- body start -->
<div id="main">

<div id="top"><p style="display: inline-block;margin-left: 6px;border-left: 3px solid blue;padding-left: 5px;cursor: pointer;color: green;margin-bottom: 3px;height: 29px;line-height: 29px;">网站公告</p></div>
<ol id="list">
{F:viewAnnouncement(4)}
</ol>

{if(!empty($forums))}
{foreach $forums as $forum}
<div id="top">
<p style="display: inline-block;margin-left: 6px;border-left: 3px solid blue;padding-left: 5px;cursor: pointer;color: green;margin-bottom: 3px;height: 29px;line-height: 29px;">{$forum['name']}</p>
</div>
<ul id="list">
{F:viewSections($forum['id'])}
</ul>
{/foreach}
{else}
<div id="tip">欢迎使用DoBBS系统</div>
{/if}

<div id="top"><p style="display: inline-block;margin-left: 6px;border-left: 3px solid blue;padding-left: 5px;cursor: pointer;color: green;margin-bottom: 3px;height: 29px;line-height: 29px;">友情链接</p></div>
<div id="box">
<ul>
{F:viewLinks(1)}
</ul>
</div>

</div>
<!-- body end -->

{include 'common/footer.html'}
</body>
</html>